/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package schtohan.business;

import java.util.ArrayList;

/**
 *
 * @author Schtohan
 */
public class Journey {
    
    private String adress;
    private ArrayList<Stop> stops;
    private Stop nextStop; 
    private String lastStopNr;

    public Journey() {
        stops = new ArrayList<Stop>();
    }
    
    //Constructor that adds the first stop to the list of stops
    public Journey(String adress, Stop stop) {
        this.adress = adress;   
        stops = new ArrayList<Stop>();
        stops.add(stop);
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public ArrayList<Stop> getStops() {
        return stops;
    }

    public void setStops(ArrayList<Stop> stops) {
        this.stops = stops;
    }

    public Stop getNextStop() {
        return nextStop;
    }

    public void setNextStop(Stop nextStop) {
        this.nextStop = nextStop;
    }
    
    public void incrementNextStop() {
        nextStop = stops.get(Integer.parseInt(nextStop.getStopNr()) + 1); 
    }

    public String getLastStopNr() {
        return lastStopNr;
    }

    public void setLastStopNr(String lastStopNr) {
        this.lastStopNr = lastStopNr;
    }

    

    

}
